package com.leedsoft.spittr;

import org.springframework.context.annotation.Condition;
import org.springframework.context.annotation.ConditionContext;
import org.springframework.core.type.AnnotatedTypeMetadata;

/**
 * Created by leeds on 2017/11/16.
 */
public class BookFacadeCondition implements Condition{
    @Override
    public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
        try {
            context.getClassLoader().loadClass("com.leedsoft.config.SessionListener111");
        } catch (ClassNotFoundException e) {
            return false;
        }
        return true;
    }
}
